//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.dv.shell.vo;

import java.beans.ConstructorProperties;

public class ResultVo<T> {
    private Integer code;
    private String msg;
    private T date;

    public static <T> ResultVo success() {
        ResultVo<Object> resultVo = new ResultVo();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        return resultVo;
    }

    public static <T> ResultVo success(T data) {
        ResultVo<Object> resultVo = new ResultVo();
        resultVo.setCode(0);
        resultVo.setMsg("成功");
        resultVo.setDate(data);
        return resultVo;
    }

    public static <T> ResultVo error(int code, String msg) {
        ResultVo<Object> resultVo = new ResultVo();
        resultVo.setCode(code);
        resultVo.setMsg(msg);
        return resultVo;
    }

    public Integer getCode() {
        return this.code;
    }

    public String getMsg() {
        return this.msg;
    }

    public T getDate() {
        return this.date;
    }

    public void setCode(Integer code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public void setDate(T date) {
        this.date = date;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        } else if (!(o instanceof ResultVo)) {
            return false;
        } else {
            ResultVo<?> other = (ResultVo)o;
            if (!other.canEqual(this)) {
                return false;
            } else {
                label47: {
                    Object this$code = this.getCode();
                    Object other$code = other.getCode();
                    if (this$code == null) {
                        if (other$code == null) {
                            break label47;
                        }
                    } else if (this$code.equals(other$code)) {
                        break label47;
                    }

                    return false;
                }

                Object this$msg = this.getMsg();
                Object other$msg = other.getMsg();
                if (this$msg == null) {
                    if (other$msg != null) {
                        return false;
                    }
                } else if (!this$msg.equals(other$msg)) {
                    return false;
                }

                Object this$date = this.getDate();
                Object other$date = other.getDate();
                if (this$date == null) {
                    if (other$date != null) {
                        return false;
                    }
                } else if (!this$date.equals(other$date)) {
                    return false;
                }

                return true;
            }
        }
    }

    protected boolean canEqual(Object other) {
        return other instanceof ResultVo;
    }



    public String toString() {
        return "ResultVo(code=" + this.getCode() + ", msg=" + this.getMsg() + ", date=" + this.getDate() + ")";
    }

    public ResultVo() {
    }

    @ConstructorProperties({"code", "msg", "date"})
    public ResultVo(Integer code, String msg, T date) {
        this.code = code;
        this.msg = msg;
        this.date = date;
    }
}
